<template>
    <div>
      <div class="recommend-title">热销推荐</div>
        <ul>
          <li class="item" v-for='item of recommendList' :key='item.id'>
            <img class="item-img" :src="item.imgUrl" alt="">
            <div class="info">
              <p class="item-title">{{item.title}}</p>
              <p class="item-info">{{item.desc}}</p>
              <button class="item-button">查看详情</button>
              </div>
          </li>
        </ul>
    </div>
</template>

<script>
export default {
  name: 'recommend',
  props: {
    recommendList: Array
  },
  data () {
    return {
    }
  }
}
</script>

<style lang='stylus' scoped>
.recommend-title {
  line-height: 0.8rem;
  text-indent: 0.2rem;
  background: #eee;
  margin-top: 0.2rem;
}

.item {
  height: 1.9rem;
  display: flex;
  padding: 0.1rem;

  .item-img {
    height: 1.7rem;
    width: 1.7rem;
    padding: 0.1rem;
  }

  .info {
    flex: 1;

    .item-title {
      margin-top: 0.2rem;
      line-height: 0.54rem;
      font-size: 0.32rem;
    }

    .item-info {
      line-height: 0.4rem;
      color: #ccc;
    }

    .item-button {
      background: #ff9300;
      padding: 0 0.1rem;
      border-radius: 0.06rem;
      margin-top: 0.2rem;
      color: #fff;
    }
  }
}
</style>
